<style>
    .page-wrapper {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    .grid-wrapper {
        flex: 1 1 0px;
    }
</style>

<div class="page-wrapper">
    <div>
        <button onclick="onBtnExportDataAsExcel()" style="margin-bottom: 5px; font-weight: bold;">Export to Excel</button>
    </div>

    <div class="grid-wrapper">
        <div id="myGrid" style="height: 100%;" class="ag-theme-quartz"></div>
    </div>
</div>